#ifndef ROBOTMAPSYSTEM_H
#define ROBOTMAPSYSTEM_H


#include <QGraphicsScene>
#include <QGraphicsView>
#include <QMouseEvent>
#include <QObject>
#include <QPoint>

/*
*   重写QGraphicsView
*/
class MapView : public QGraphicsView
{
    Q_OBJECT
public:
    MapView(QWidget* parent = nullptr);

protected:
    void mouseMoveEvent(QMouseEvent* event) override;
    void mousePressEvent(QMouseEvent* event) override;

signals:
    /*
    * @Brief: 发送鼠标坐标信号
    */
    void mouseMovePoint(QPoint point);
    void mouseClicked(QPoint point);

};

/*
*   重写QGraphicsScene
*/
class MapScene : public QGraphicsScene
{
    Q_OBJECT
public:
    MapScene(QObject *parent = nullptr);
    MapScene(const QRectF &sceneRect, QObject *parent = nullptr);
    MapScene(qreal x, qreal y, qreal width, qreal height, QObject *parent = nullptr);
};


#endif // ROBOTMAPSYSTEM_H
